﻿========================================================================
  VBA2LOBasic - VBA→LibreOffice Basic 変換ツール  Version 0.2.0
========================================================================

  ソフト名     : VBA2LOBasic - VBA→LibreOffice Basic 変換ツール
  バージョン   : 0.2.0
  作 者        : highdefinitionaudiodriver
  動作環境     : Windows 10/11, macOS 12+, Linux / Python 3.10 以上
  ライセンス   : MIT License（フリーソフト／オープンソース）
  種 別        : フリーソフト
  作成日       : 2026-06-08

------------------------------------------------------------------------
■ ソフトの説明 / 使用方法（README より）
------------------------------------------------------------------------

VBA2LOBasic

A cross-platform Python tool for VBA macro migration assessment and LibreOffice Basic conversion support.

It extracts VBA from Microsoft Office files, analyzes macro patterns, and generates LibreOffice Basic migration candidates with reports. This helps teams estimate the cost and risk of moving Office automation away from Microsoft Office before committing to a full migration.

---

🎯 これは何？（30秒で）

- 誰のため：Microsoft Office ライセンスコスト削減を検討中の自治体・教育機関・中小企業 IT 担当
- 何が解決される：自社の VBA マクロ資産が LibreOffice Basic へどれくらい移行可能かを 「抽出 → 解析 → 移行候補生成 → 互換性レポート」 の自動パイプラインで可視化。脱 Microsoft Office の意思決定材料を提供
- なぜ既存ツールではダメか：LibreOffice 公式の変換ツールは存在せず、手作業移行が現実。本ツールは クロスプラットフォーム Python で自動化し、移行可否判定とレポートを出力
- 使う条件：Python 3.10+ / Windows・macOS・Linux

💰 想定ユースケース・価格帯

| 用途 | 形態 |
|---|---|
| OSS としての利用（自社内 PoC） | 無料（MIT） |
| 自治体・教育機関の マクロ資産棚卸し・移行レポート受託 | 応相談 |
| 業界特化（会計・経理向け）の追加変換ルール開発 | 個別見積もり |

---

Business Use Cases

- Microsoft Office to LibreOffice / OpenOffice migration pre-assessment
- VBA macro inventory, extraction, and compatibility review
- Conversion reports for manual remediation planning
- Public-sector, education, and cost-reduction projects that need offline desktop compatibility

Features

- Cross-Platform: Works fully on Windows, macOS, and Linux.
- Dual Interface: Includes a comprehensive Command Line Interface (CLI) and a user-friendly Graphical User Interface (GUI).
- Direct Extraction: Extract and parse VBA code directly from macro-enabled Office files (.xlsm, .docm, .pptm) without needing Microsoft Office installed.
- Smart Conversion Support: Generates LibreOffice Basic migration candidates from VBA source files (.bas, .cls, .frm), adapting functions and objects where possible.
- Reporting & Dry-Run: View detailed conversion reports showing warnings and errors, with JSON output support and a "dry-run" tool to preview changes before converting.

Installation

1. Make sure you have Python 3.10 or higher.
2. Clone the repository and install the application:
   
   pip install .
   
   For development capabilities (e.g. tests, linting):
   
   pip install .[dev]
   

Usage

GUI Mode
Launch the graphical interface directly:

vba2lobasic-gui

*(Alternatively, you can run vba2lobasic gui)*

CLI Mode

The main vba2lobasic CLI comes with multiple commands built-in.

1. Convert macros
Convert individual files or entire directories, automatically detecting the source application context:

vba2lobasic convert path/to/macro.xlsm -o output_directory/

*Key Options:*
- --source-app [excel|word|powerpoint|auto]: specify the source context instead of relying on auto-detection.
- --recursive: Process directories recursively.
- --report / --report-json: Generate summary or detailed JSON conversion reports.

2. Extract VBA code
Extract raw VBA files (.bas, .cls, .frm) from a macro-enabled Office document without running the conversion step:

vba2lobasic extract path/to/document.docm -o output_directory/


3. Dry-Run (Report)
Simulate the conversion and display what would be changed, without writing any output:

vba2lobasic report path/to/file.bas


Development & Tests

The project uses pytest for testing. To run the suite:

pytest


---

🤝 商用利用・カスタマイズ依頼

- 個人・社内利用は無料（MIT ライセンス）
- 法人・自治体・SI 向け導入支援、カスタマイズ、診断レポート受託は応相談
- 連絡先：highdefinitionaudiodriver@gmail.com

<!-- CODEX-CURRENT-STATUS:START -->
現状サマリ (2026-05-25)

- 対象: VBA2LOBasic
- 作業ブランチ: main
- README更新時点の参照コミット: 320baca chore: scripts/.gitignore - __pycache__ を除外
- Python プロジェクト。pyproject.toml を起点に依存関係とツール設定を管理。
- docs ディレクトリ配下に設計・運用・補足資料を配置。
- tests ディレクトリ配下にテストを配置。
- src ディレクトリ配下に主要実装を配置。
- 主要な確認コマンド: python -m pytest または README 記載の Python コマンド
- 次に進めるなら、README 内の利用手順と既存 docs / tests を起点に、未整備の検証手順・引き継ぎメモ・CI 化を補強する。
<!-- CODEX-CURRENT-STATUS:END -->

------------------------------------------------------------------------
■ 動作環境
------------------------------------------------------------------------
  Windows 10/11, macOS 12+, Linux / Python 3.10 以上
  ※ オンライン専用ソフトではありません（ローカル環境で動作します）。

------------------------------------------------------------------------
■ インストール / アンインストール
------------------------------------------------------------------------
  ・本アーカイブを任意のフォルダに展開してください。
  ・詳細な起動手順は上記「ソフトの説明」および同梱の README を参照してください。
  ・アンインストールは展開したフォルダを削除するだけです（レジストリ不使用）。

------------------------------------------------------------------------
■ 転載・再配布について
------------------------------------------------------------------------
  本ソフトは MIT License のオープンソースです。同梱の LICENSE 条文に
  従う限り、自由に利用・改変・再配布できます。
  なお Vector 以外の配布サイトへの無断転載はご遠慮ください。

------------------------------------------------------------------------
■ 免責事項
------------------------------------------------------------------------
  本ソフトの使用によって生じたいかなる損害についても、作者は一切の
  責任を負いません。利用者ご自身の責任においてご使用ください。

------------------------------------------------------------------------
■ 著作権
------------------------------------------------------------------------
  Copyright (c) 2026 highdefinitionaudiodriver
  本ソフトは MIT License の下で公開されています。

------------------------------------------------------------------------
■ 連絡先 / サポート
------------------------------------------------------------------------
  作 者        : highdefinitionaudiodriver
  E-mail       : highdefinitionaudiodriver@gmail.com
  GitHub       : https://github.com/highdefinitionaudiodriver/VBA2LOBasic.git
  不具合報告・ご要望は上記 E-mail もしくはリポジトリの Issues へ
  お願いいたします。

========================================================================
